CC=gcc
FLAGS= -I"sources" -I"binaries" -w 
#Wall
SOURCES=new
BINARIES=bin

#
# Program
# ----------------------------------------------------------------------------------------------
all: my_thread exemple errors
	$(CC) -o my_thread $(BINARIES)/*.o


clean:
	rm -f $(BINARIES)/*
	rm -f my_thread

#
# Errors
# ----------------------------------------------------------------------------------------------
errors:
	$(CC) -o $(BINARIES)/error.o -c $(SOURCES)/error.c $(FLAGS)

#
# Declarations
# ----------------------------------------------------------------------------------------------
my_thread: my_thread_list
	$(CC) -o $(BINARIES)/my_thread.o -c $(SOURCES)/my_thread.c $(FLAGS)
	$(CC) -o $(BINARIES)/my_thread_list.o -c $(SOURCES)/my_thread_list.c $(FLAGS)

exemple: new/example.c
	$(CC) -o $(BINARIES)/ex.o -c $(SOURCES)/example.c $(FLAGS)
#
# Generation
# ----------------------------------------------------------------------------------------------
generation: 
	$(CC) -o $(BINARIES)/my_thread.o -c $(SOURCES)/my_thread.c $(FLAGS)


